
#ifndef WISHMASTER_KAREHAPARSER_H
#define WISHMASTER_KAREHAPARSER_H

#include <QObject>
#include "boardparsers/boardparser.h"

namespace Wishmaster
{
	struct KarehaParserImpl;
	class KarehaParser : public QObject, public BoardParser
	{
		Q_OBJECT
		Q_INTERFACES(Wishmaster::BoardParser)
	public:
		KarehaParser(const QString& boardname = QString());
		virtual ~KarehaParser();

		virtual QList<ThreadInfo> getThreadList(const QString& chanName, const QString& boardId, const QByteArray& input);
		virtual QList<PostInfo> getPosts(const ThreadId& threadId, const QByteArray& input);
		virtual PostId getPostID(const QString& link, const ThreadId& threadId);

		virtual void setTimestampFormat(const QString& format);

		virtual QString id();
		virtual BoardParser* clone(const QString& boardname);

		virtual QList<PostId> findLinks(const ThreadId& threadId, const QString& posttext);

	private:
		KarehaParserImpl* m_impl;
	};
}

#endif

